<?php

/**
 * 基础API
 */

namespace app\base\api;

class BaseApi extends \dux\kernel\Api {

    protected $sysInfo;

    public function __construct() {
        parent::__construct();
        $this->sysInfo = \Config::get('dux.use_info');
        $this->checkLink();
    }

    /**
     * 检查链接码
     */
    private function checkLink() {
        $comKey = request('', 'link');
        if($this->sysInfo['com_key'] <> $comKey) {
            $this->error(1, 'Link Error code');
        }
    }

}